package com.example.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;
import java.util.List;


@TableName("shipping_order")//当实体类和表名不一致的时候，用@tablename来指定表名
public class ShippingOrder {
    @TableId(type = IdType.AUTO)
    private Long id;
    private Long creatorId;
    private String creatorName;
    @JsonFormat(shape = JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date time;
    private Long carrierId;
    private String start;
    private String consignee;//收货人
    private String target;
    private String goods;
    private Float weight;
    private float distance;
    private Integer state;
    @TableField(value = "`desc`")
    private String desc;
    private Double unexpectedCost;
    private Double logisticsCost;
    private Double totalPrice;
    private String remark;
    @TableField(exist = false)
    private List<OperationRecord> operationRecords;

    @TableField(exist = false)
    private List<TruckOrder> truckOrder;


    public ShippingOrder(Long creatorId, String realName, String start, String end, String consignee, Float distance, String desc,String goods, Float weight,Date time) {
        this.creatorId = creatorId;
        this.creatorName = realName;
        this.time = time;
        this.start = start;
        this.target = end;
        this.consignee = consignee;
        this.distance = distance;
        this.desc = desc;
        this.goods = goods;
        this.weight = weight;
    }

    public ShippingOrder() {

    }


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getCreatorId() {
        return creatorId;
    }

    public void setCreatorId(Long creatorId) {
        this.creatorId = creatorId;
    }

    public String getCreatorName() {
        return creatorName;
    }

    public void setCreatorName(String creatorName) {
        this.creatorName = creatorName;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public Double getUnexpectedCost() {
        return unexpectedCost;
    }

    public void setUnexpectedCost(Double unexpectedCost) {
        this.unexpectedCost = unexpectedCost;
    }

    public Double getLogisticsCost() {
        return logisticsCost;
    }

    public void setLogisticsCost(Double logisticsCost) {
        this.logisticsCost = logisticsCost;
    }

    public Double getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(Double totalPrice) {
        this.totalPrice = totalPrice;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }


    public List<OperationRecord> getOperationRecords() {
        return operationRecords;
    }

    public void setOperationRecords(List<OperationRecord> operationRecords) {
        this.operationRecords = operationRecords;
    }



    public String getStart() {
        return start;
    }

    public void setStart(String start) {
        this.start = start;
    }

    public String getTarget() {
        return target;
    }

    public void setTarget(String target) {
        this.target = target;
    }

    public float getDistance() {
        return distance;
    }

    public void setDistance(float distance) {
        this.distance = distance;
    }

    public String getConsignee() {
        return consignee;
    }

    public void setConsignee(String consignee) {
        this.consignee = consignee;
    }

    public Long getCarrierId() {
        return carrierId;
    }

    public void setCarrierId(Long carrierId) {
        this.carrierId = carrierId;
    }

    public List<TruckOrder> getTruckOrder() {
        return truckOrder;
    }

    public void setTruckOrder(List<TruckOrder> truckOrder) {
        this.truckOrder = truckOrder;
    }

    public String getGoods() {
        return goods;
    }

    public void setGoods(String goods) {
        this.goods = goods;
    }

    public Float getWeight() {
        return weight;
    }

    public void setWeight(Float weight) {
        this.weight = weight;
    }
}